#include <iostream>
using namespace std;
int main()
{int n,a[280],j=1;
 float c; 
 for (int i=1;;i++) 
  {float m=0;
   cin>>c;
   if(c==0.00) break;
   for(n=1;;n++)
     {m=m+1.0/(n+1);
      if (m>c) 
      {a[j]=n;j=j+1;break;}
     }
   }
  for(int h=1;h<=j-1;h++) 
   cout<<a[h]<<" "<<"card(s)"<<endl;
   system ("pause");
   return 0;
}
